<script>

export default {
	onLaunch: function() {
		console.log('App Launch')
		// 应用启动时预加载字典数据
		this.preloadDictData()
	},
	// #ifdef H5
	onShow: function(params) {
		if (params.query && params.query.userOid) {
			this.$store.dispatch('GetLoginDatas', { code: params.query.userOid, type: 'codePass' })
		}
	},
	// #endif
	onHide: function() {
		console.log('App Hide')
	},
	methods: {
		// 预加载所有字典数据
		preloadDictData() {
			// 使用setTimeout避免阻塞应用启动
			setTimeout(() => {
				this.$store.dispatch('dict/loadAllDict')
					.then(() => {
						console.log('字典数据预加载成功')
					})
					.catch(err => {
						console.error('字典数据预加载失败:', err)
					})
			})
		}
	}
}
</script>

<style lang="scss">
	image{
		max-width: 100%;
	}
	img{
		max-width: 100%;
	}
	.uni-tabbar-bottom{
		display: none;
	}
	.PolicySearch {
		padding: 32rpx 42rpx 62rpx;
		background: #1977ff;
	
		.PolicySearchc {
			display: flex;
			align-items: center;
			justify-content: space-between;
			height: 98rpx;
			padding-left: 87rpx;
			padding-right: 32rpx;
			border-radius: 20rpx;
			background: #ffffff url("/static/images/searchbtn.png") no-repeat 30rpx center / 37rpx 37rpx;
	
			input {
				width: 460rpx;
				font-size: 28rpx;
				color: #9fa3a8;
				border: none;
				outline: none;
				background: none;
			}
	
			.PolocyBtn {
				font-size: 28rpx;
				color: #2f59fe;
				font-weight: bold;
			}
		}
	}
	
	// H5适配代码
	.uni-app--showtabbar uni-page-wrapper::after{
		display: none;
	}
</style>
